import request from '@/utils/request'

//官网轮播图分页列表
export function officialBannerLs(params) {
    return request({
      url: `/system/officialBanner/list`,
      method: 'get',
      params
    })
}
//新增官网轮播图
export function addOfficialBanner(data) {
    return request({
      url: '/system/officialBanner',
      method: 'post',
      data
    })
}
//编辑官网轮播图
export function editOfficialBanner(data) {
    return request({
      url: `/system/officialBanner`,
      method: 'put',
      data
    })
}
//官网轮播图详情
export function officialBannerDetail(id) {
    return request({
      url: `/system/officialBanner/${id}`,
      method: 'get',
    })
}
//删除官网轮播图
export function deleteOfficialBanner(id) {
    return request({
      url: `/system/officialBanner/${id}`,
      method: 'DELETE',
    })
}
//文章分类分页列表
export function articleTypeLs(params) {
    return request({
      url: `/system/articleType/list`,
      method: 'get',
      params
    })
}
//新增官网轮播图
export function addArticleType(data) {
  return request({
    url: '/system/articleType',
    method: 'post',
    data
  })
}
//编辑文章分类
export function editArticleType(data) {
  return request({
    url: `/system/articleType`,
    method: 'put',
    data
  })
}
//文章分类详情
export function articleTypeDetail(id) {
  return request({
    url: `/system/articleType/${id}`,
    method: 'get',
  })
}
//删除文章分类
export function deleteArticleType(id) {
  return request({
    url: `/system/articleType/${id}`,
    method: 'DELETE',
  })
}
//文章分类下拉列表
export function articleType(params) {
  return request({
    url: `/common/v1/articleType`,
    method: 'get',
    params
  })
}
//文章分页列表
export function articleList(params) {
  return request({
    url: `/system/article/list`,
    method: 'get',
    params
  })
}
//新增文章
export function addArticle(data) {
  return request({
    url: '/system/article',
    method: 'post',
    data
  })
}
//编辑文章
export function editArticle(data) {
  return request({
    url: `/system/article`,
    method: 'put',
    data
  })
}
//文章详情
export function articleDetail(id) {
  return request({
    url: `/system/article/${id}`,
    method: 'get',
  })
}
//删除文章
export function deleteArticle(id) {
  return request({
    url: `/system/article/${id}`,
    method: 'DELETE',
  })
}
//显示隐藏文章
export function editArticleStatus(params) {
  return request({
      url: `/system/article/editArticleStatus`,
      method: 'put',
      headers: {
          'Content-Type': 'application/x-www-form-urlencoded'
      },
      params
  })
}
//视频分页列表
export function videoList(params) {
  return request({
    url: `/system/video/list`,
    method: 'get',
    params
  })
}
//新增文章
export function addVideo(data) {
  return request({
    url: '/system/video',
    method: 'post',
    data
  })
}
//编辑视频
export function editVideo(data) {
  return request({
    url: `/system/video`,
    method: 'put',
    data
  })
}
//视频详情
export function videoDetail(id) {
  return request({
    url: `/system/video/${id}`,
    method: 'get',
  })
}
//删除视频
export function deleteVideo(id) {
  return request({
    url: `/system/video/${id}`,
    method: 'DELETE',
  })
}
//显示隐藏视频
export function editVideoStatus(params) {
  return request({
      url: `/system/video/editVideoStatus`,
      method: 'put',
      headers: {
          'Content-Type': 'application/x-www-form-urlencoded'
      },
      params
  })
}
//联系留言分页列表
export function contactList(params) {
  return request({
    url: `/system/contact/list`,
    method: 'get',
    params
  })
}
//联系留言 已读留言
export function contactRead(params) {
  return request({
      url: `/system/contact/read`,
      method: 'put',
      headers: {
          'Content-Type': 'application/x-www-form-urlencoded'
      },
      params
  })
}